package com.etoc.test.activiti.listener;

import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.ExecutionListener;

/**
 * 流程启动监听器
 *
 * @author henryyan
 */
public class ProcessExecutionListener implements ExecutionListener {

    /**
	 * 注释内容
	 */
	private static final long serialVersionUID = -8686245355440025421L;

	@Override
    public void notify(DelegateExecution execution) throws Exception {
    	System.out.println("pdid=" + execution.getProcessDefinitionId() + ", piid=" + execution.getProcessInstanceId() + ", bid=" + execution.getProcessBusinessKey() + ", aid=" + execution.getCurrentActivityId() + ": ");
        System.out.println("\t" + this.getClass().getSimpleName() + ", " + execution.getEventName());
    }

}
